package com.embracesource.monitor;

import com.gnerv.pabu.basic.core.listenter.KafkaListenter;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Slf4j
@SpringBootApplication
@ComponentScan(basePackages = {"com.gnerv.pabu", "com.embracesource.monitor"})
@MapperScan(basePackages = {"com.gnerv.pabu.**.mapper", "com.embracesource.monitor.**.mapper"})
@EnableTransactionManagement
@EnableRedisHttpSession
public class MonitorApplication {

    public static void main(String[] args) {
        SpringApplication.run(MonitorApplication.class, args);
        KafkaListenter.interrupted();
    }

}
